<!DOCTYPE html>
<html lang="zh" dir="ltr" class="client-nojs">
<head>
<title>C++ 关键词</title>
<meta charset="UTF-8">
<meta name="generator" content="MediaWiki 1.21.2">
<link rel="shortcut icon" href="../../common/favicon.ico">
<link rel="stylesheet" href="../../common/ext.css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" href="../../common/site_modules.css">
<style>a:lang(ar),a:lang(ckb),a:lang(fa),a:lang(kk-arab),a:lang(mzn),a:lang(ps),a:lang(ur){text-decoration:none}#toc{display:none}.editsection{display:none}
/* cache key: mwiki1-mwiki_zh_:resourceloader:filter:minify-css:7:15cea3ec788a65b5187d4018eed543bf */</style>

<script src="../../common/startup_scripts.js"></script>
<script>if(window.mw){
mw.config.set({"wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"cpp/keyword","wgTitle":"cpp/keyword","wgCurRevisionId":62522,"wgArticleId":811,"wgIsArticle":true,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":[],"wgBreakFrames":false,"wgPageContentLanguage":"zh","wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"zh","wgMonthNames":["","1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"wgMonthNamesShort":["","1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"wgRelevantPageName":"cpp/keyword","wgUserVariant":"zh","wgRestrictionEdit":[],"wgRestrictionMove":[]});
}</script><script>if(window.mw){
mw.loader.implement("user.options",function(){mw.user.options.set({"ccmeonemails":0,"cols":80,"date":"default","diffonly":0,"disablemail":0,"disablesuggest":0,"editfont":"default","editondblclick":0,"editsection":0,"editsectiononrightclick":0,"enotifminoredits":0,"enotifrevealaddr":0,"enotifusertalkpages":1,"enotifwatchlistpages":0,"extendwatchlist":0,"externaldiff":0,"externaleditor":0,"fancysig":0,"forceeditsummary":0,"gender":"unknown","hideminor":0,"hidepatrolled":0,"imagesize":2,"justify":0,"math":1,"minordefault":0,"newpageshidepatrolled":0,"nocache":0,"noconvertlink":0,"norollbackdiff":0,"numberheadings":0,"previewonfirst":0,"previewontop":1,"quickbar":5,"rcdays":7,"rclimit":50,"rememberpassword":0,"rows":25,"searchlimit":20,"showhiddencats":0,"showjumplinks":1,"shownumberswatching":1,"showtoc":0,"showtoolbar":1,"skin":"cppreference2","stubthreshold":0,"thumbsize":2,"underline":2,"uselivepreview":0,"usenewrc":0,"watchcreations":0,"watchdefault":0,"watchdeletion":0,
"watchlistdays":3,"watchlisthideanons":0,"watchlisthidebots":0,"watchlisthideliu":0,"watchlisthideminor":0,"watchlisthideown":0,"watchlisthidepatrolled":0,"watchmoves":0,"wllimit":250,"variant":"zh","language":"zh","searchNs0":true,"searchNs1":false,"searchNs2":false,"searchNs3":false,"searchNs4":false,"searchNs5":false,"searchNs6":false,"searchNs7":false,"searchNs8":false,"searchNs9":false,"searchNs10":false,"searchNs11":false,"searchNs12":false,"searchNs13":false,"searchNs14":false,"searchNs15":false,"gadget-MathJax":1,"gadget-ColiruCompiler":1});;},{},{});mw.loader.implement("user.tokens",function(){mw.user.tokens.set({"editToken":"+\\","patrolToken":false,"watchToken":false});;},{},{});
/* cache key: mwiki1-mwiki_zh_:resourceloader:filter:minify-js:7:258d7cd6aa9aa67dee25e01fb6a9e505 */
}</script>
<script>if(window.mw){
mw.loader.load(["mediawiki.page.startup","mediawiki.legacy.wikibits","mediawiki.legacy.ajax"]);
}</script>
<!--[if lt IE 7]><style type="text/css">body{behavior:url("/mwiki/skins/cppreference2/csshover.min.htc")}</style><![endif]--></head>
<body class="mediawiki ltr sitedir-ltr ns-0 ns-subject page-cpp_keyword skin-cppreference2 action-view cpp-navbar">
        <!-- header -->
        <!-- /header -->
        <!-- content -->
<div id="cpp-content-base">
            <div id="content">
                <a id="top"></a>
                <div id="mw-js-message" style="display:none;"></div>
                                <!-- firstHeading -->
<h1 id="firstHeading" class="firstHeading">C++ 关键词</h1>
                <!-- /firstHeading -->
                <!-- bodyContent -->
                <div id="bodyContent">
                                        <!-- tagline -->
                    <div id="siteSub">来自cppreference.com</div>
                    <!-- /tagline -->
                                        <!-- subtitle -->
                    <div id="contentSub"><span class="subpages">&lt; <a href="../cpp.html" title="cpp">cpp</a></span></div>
                    <!-- /subtitle -->
                                                            <!-- bodycontent -->
                    <div id="mw-content-text" lang="zh" dir="ltr" class="mw-content-ltr"><div class="t-navbar" style=""><div class="t-navbar-sep"> </div><div class="t-navbar-head"><a href="../cpp.html" title="cpp"> C++</a><div class="t-navbar-menu"><div><div><table class="t-nv-begin" cellpadding="0" style="line-height:1.1em;">
<tr class="t-nv"><td colspan="5"> <a href="language.html" title="cpp/language">语言</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="header.html" title="cpp/header">标准库头文件</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="freestanding.html" title="cpp/freestanding"> 自立与有宿主实现</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="named_req.html" title="cpp/named req">具名要求</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="utility.html#.E8.AF.AD.E8.A8.80.E6.94.AF.E6.8C.81" title="cpp/utility">语言支持库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="concepts.html" title="cpp/concepts">概念库</a> <span class="t-mark-rev t-since-cxx20">(C++20)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="error.html" title="cpp/error">诊断库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="utility.html" title="cpp/utility">工具库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="string.html" title="cpp/string">字符串库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="https://zh.cppreference.com/w/cpp/container" title="cpp/container">容器库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="iterator.html" title="cpp/iterator">迭代器库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="ranges.html" title="cpp/ranges"> 范围库</a> <span class="t-mark-rev t-since-cxx20">(C++20)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="algorithm.html" title="cpp/algorithm">算法库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="numeric.html" title="cpp/numeric">数值库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="io.html" title="cpp/io">输入/输出库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="locale.html" title="cpp/locale">本地化库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="regex.html" title="cpp/regex">正则表达式库</a> <span class="t-mark-rev t-since-cxx11">(C++11)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="atomic.html" title="cpp/atomic">原子操作库</a> <span class="t-mark-rev t-since-cxx11">(C++11)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="thread.html" title="cpp/thread">线程支持库</a> <span class="t-mark-rev t-since-cxx11">(C++11)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="filesystem.html" title="cpp/filesystem">文件系统库</a> <span class="t-mark-rev t-since-cxx17">(C++17)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="experimental.html" title="cpp/experimental">技术规范</a> </td></tr>
</table></div><div></div></div></div></div><div class="t-navbar-sep"> </div><div class="t-navbar-head"><a href="language.html" title="cpp/language">C++ 语言</a><div class="t-navbar-menu"><div><div style="display:inline-block">
<div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv-h1"><td colspan="5"> 一般主题</td></tr>
<tr class="t-nv-col-table"><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <a href="preprocessor.html" title="cpp/preprocessor"> 预处理器</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="comments.html" title="cpp/comment"> 注释</a></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <strong class="selflink"> 关键词</strong></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/escape.html" title="cpp/language/escape"> 转义序列</a></td></tr>
</table></div></td></tr>
<tr class="t-nv-h1"><td colspan="5"> 流程控制</td></tr>
<tr class="t-nv-h2"><td colspan="5"> 条件执行语句</td></tr>
<tr class="t-nv-col-table"><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <a href="language/if.html" title="cpp/language/if"> <code>if</code></a></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <a href="language/switch.html" title="cpp/language/switch"> <code>switch</code></a></td></tr>
</table></div></td></tr>
<tr class="t-nv-h2"><td colspan="5"> 重复语句（循环）</td></tr>
<tr class="t-nv-col-table"><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <a href="language/for.html" title="cpp/language/for"> <code>for</code></a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/range-for.html" title="cpp/language/range-for"> 范围 <code>for</code></a> <span class="t-mark-rev t-since-cxx11">(C++11)</span></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <a href="language/while.html" title="cpp/language/while"> <code>while</code></a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/do.html" title="cpp/language/do"> <code>do-while</code></a></td></tr>
</table></div></td></tr>
<tr class="t-nv-h2"><td colspan="5"> 跳转语句 </td></tr>
<tr class="t-nv-col-table"><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <a href="language/continue.html" title="cpp/language/continue"> <code>continue</code></a> - <a href="language/break.html" title="cpp/language/break"> <code>break</code></a></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <a href="language/goto.html" title="cpp/language/goto"> <code>goto</code></a> - <a href="language/return.html" title="cpp/language/return"> <code>return</code></a></td></tr>
</table></div></td></tr>
<tr class="t-nv-h1"><td colspan="5"> 函数</td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/function.html" title="cpp/language/function"> 函数声明</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/lambda.html" title="cpp/language/lambda"> Lambda 函数声明</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/inline.html" title="cpp/language/inline"> <code>inline</code> 说明符</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/except_spec.html" title="cpp/language/except spec"> 异常规定</a> <span class="t-mark-rev t-until-cxx20">(C++20 前)</span></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/noexcept_spec.html" title="cpp/language/noexcept spec"> <code>noexcept</code> 说明符</a> <span class="t-mark-rev t-since-cxx11">(C++11)</span></td></tr>
<tr class="t-nv-h1"><td colspan="5"> 异常</td></tr>
<tr class="t-nv-col-table"><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <a href="language/throw.html" title="cpp/language/throw"> <code>throw</code> 表达式</a></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <a href="language/try_catch.html" title="cpp/language/try catch"> <code>try</code>-<code>catch</code> 块</a></td></tr>
</table></div></td></tr>
<tr class="t-nv-h1"><td colspan="5"> 命名空间</td></tr>
<tr class="t-nv-col-table"><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <a href="language/namespace.html" title="cpp/language/namespace"> 命名空间声明</a></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <a href="language/namespace_alias.html" title="cpp/language/namespace alias"> 命名空间别名</a></td></tr>
</table></div></td></tr>
<tr class="t-nv-h1"><td colspan="5"> 类型</td></tr>
<tr class="t-nv-col-table"><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <a href="language/types.html" title="cpp/language/types"> 基础类型</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/enum.html" title="cpp/language/enum"> 枚举类型</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/function.html" title="cpp/language/function"> 函数类型</a></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <a href="language/class.html" title="cpp/language/class"> 复合类型</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/union.html" title="cpp/language/union"> 联合体类型</a></td></tr>
</table></div></td></tr>
<tr class="t-nv-h2"><td colspan="5"> 说明符</td></tr>
<tr class="t-nv-col-table"><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <a href="language/decltype.html" title="cpp/language/decltype"> <code>decltype</code></a> <span class="t-mark-rev t-since-cxx11">(C++11)</span></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/auto.html" title="cpp/language/auto"> <code>auto</code></a> <span class="t-mark-rev t-since-cxx11">(C++11)</span></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/alignas.html" title="cpp/language/alignas"> <code>alignas</code></a> <span class="t-mark-rev t-since-cxx11">(C++11)</span></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <a href="language/cv.html" title="cpp/language/cv"> <code>const</code>/<code>volatile</code></a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/constexpr.html" title="cpp/language/constexpr"> <code>constexpr</code></a> <span class="t-mark-rev t-since-cxx11">(C++11)</span></td></tr>
</table></div></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/storage_duration.html" title="cpp/language/storage duration"> 存储期说明符</a></td></tr>
<tr class="t-nv-h2"><td colspan="5"> 初始化</td></tr>
<tr class="t-nv-col-table"><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <a href="language/default_initialization.html" title="cpp/language/default initialization"> 默认初始化</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/value_initialization.html" title="cpp/language/value initialization"> 值初始化</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/zero_initialization.html" title="cpp/language/zero initialization"> 零初始化</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/copy_initialization.html" title="cpp/language/copy initialization"> 复制初始化</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/direct_initialization.html" title="cpp/language/direct initialization"> 直接初始化</a></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <a href="language/aggregate_initialization.html" title="cpp/language/aggregate initialization"> 聚合初始化</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/list_initialization.html" title="cpp/language/list initialization"> 列表初始化</a> <span class="t-mark-rev t-since-cxx11">(C++11)</span></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/constant_initialization.html" title="cpp/language/constant initialization"> 常量初始化</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/reference_initialization.html" title="cpp/language/reference initialization"> 引用初始化</a></td></tr>
</table></div></td></tr>
</table></div>
</div>
<div style="display:inline-block">
<div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv-h1"><td colspan="5"> 表达式</td></tr>
<tr class="t-nv-col-table"><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <a href="language/value_category.html" title="cpp/language/value category"> 值类别</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/eval_order.html" title="cpp/language/eval order"> 求值顺序</a></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <a href="language/operators.html" title="cpp/language/operators"> 运算符</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/operator_precedence.html" title="cpp/language/operator precedence"> 运算符优先级</a></td></tr>
</table></div></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/operator_alternative.html" title="cpp/language/operator alternative"> 替代表示</a></td></tr>
<tr class="t-nv-h2"><td colspan="5"> 字面量</td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/bool_literal.html" title="cpp/language/bool literal"> 布尔</a> - <a href="language/integer_literal.html" title="cpp/language/integer literal"> 整数</a> - <a href="language/floating_literal.html" title="cpp/language/floating literal"> 浮点</a></td></tr>   
<tr class="t-nv"><td colspan="5"> <a href="language/character_literal.html" title="cpp/language/character literal"> 字符</a> - <a href="language/string_literal.html" title="cpp/language/string literal"> 字符串</a> - <a href="language/nullptr.html" title="cpp/language/nullptr"> <code>nullptr</code></a> <span class="t-mark-rev t-since-cxx11">(C++11)</span></td></tr> 
<tr class="t-nv"><td colspan="5"> <a href="language/user_literal.html" title="cpp/language/user literal"> 用户定义</a> <span class="t-mark-rev t-since-cxx11">(C++11)</span></td></tr>
<tr class="t-nv-h1"><td colspan="5"> 工具</td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/attributes.html" title="cpp/language/attributes"> 属性</a> <span class="t-mark-rev t-since-cxx11">(C++11)</span></td></tr>
<tr class="t-nv-h2"><td colspan="5"> 类型</td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/typedef.html" title="cpp/language/typedef"> <code>typedef</code> 声明</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/type_alias.html" title="cpp/language/type alias"> 类型别名声明</a> <span class="t-mark-rev t-since-cxx11">(C++11)</span></td></tr>
<tr class="t-nv-h2"><td colspan="5"> 类型转换</td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/implicit_cast.html" title="cpp/language/implicit conversion"> 隐式转换</a> - <a href="language/explicit_cast.html" title="cpp/language/explicit cast"> 显式转换</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/static_cast.html" title="cpp/language/static cast"> <code>static_cast</code></a> - <a href="language/dynamic_cast.html" title="cpp/language/dynamic cast"> <code>dynamic_cast</code></a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/const_cast.html" title="cpp/language/const cast"> <code>const_cast</code></a> - <a href="language/reinterpret_cast.html" title="cpp/language/reinterpret cast"> <code>reinterpret_cast</code></a></td></tr>
<tr class="t-nv-h2"><td colspan="5"> 内存分配</td></tr>
<tr class="t-nv-col-table"><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <a href="language/new.html" title="cpp/language/new"> <code>new</code> 表达式</a></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <a href="language/delete.html" title="cpp/language/delete"> <code>delete</code> 表达式</a></td></tr>
</table></div></td></tr>
<tr class="t-nv-h1"><td colspan="5"> 类</td></tr>
<tr class="t-nv-col-table"><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <a href="language/class.html" title="cpp/language/class"> 类声明</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/constructor.html" title="cpp/language/initializer list"> 初始化器列表</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/this.html" title="cpp/language/this"> <code>this</code> 指针</a></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <a href="language/access.html" title="cpp/language/access"> 访问说明符</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/friend.html" title="cpp/language/friend"> <code>friend</code> 说明符</a></td></tr>
</table></div></td></tr>
<tr class="t-nv-h2"><td colspan="5"> 特定于类的函数性质</td></tr>
<tr class="t-nv-col-table"><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <a href="language/virtual.html" title="cpp/language/virtual"> 虚函数</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/override.html" title="cpp/language/override"> <code>override</code> 指定符</a>  <span class="t-mark-rev t-since-cxx11">(C++11)</span></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/final.html" title="cpp/language/final"> <code>final</code> 说明符</a>  <span class="t-mark-rev t-since-cxx11">(C++11)</span></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <a href="language/explicit.html" title="cpp/language/explicit"> <code>explicit</code></a>  <span class="t-mark-rev t-since-cxx11">(C++11)</span></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/static.html" title="cpp/language/static"> <code>static</code></a> </td></tr>
</table></div></td></tr>
<tr class="t-nv-h2"><td colspan="5"> 特殊成员函数</td></tr>
<tr class="t-nv-col-table"><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <a href="language/default_constructor.html" title="cpp/language/default constructor"> 默认构造函数</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/copy_constructor.html" title="cpp/language/copy constructor"> 复制构造函数</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/move_constructor.html" title="cpp/language/move constructor"> 移动构造函数</a> <span class="t-mark-rev t-since-cxx11">(C++11)</span></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <a href="language/copy_assignment.html" title="cpp/language/copy assignment"> 复制赋值</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/move_assignment.html" title="cpp/language/move assignment"> 移动赋值</a> <span class="t-mark-rev t-since-cxx11">(C++11)</span></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/destructor.html" title="cpp/language/destructor"> 析构函数</a></td></tr>
</table></div></td></tr>
<tr class="t-nv-h1"><td colspan="5"> 模板</td></tr>
<tr class="t-nv-col-table"><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <a href="language/class_template.html" title="cpp/language/class template"> 类模板</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="language/function_template.html" title="cpp/language/function template"> 函数模板</a></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <a href="language/template_specialization.html" title="cpp/language/template specialization"> 模板特化</a></td></tr>   
<tr class="t-nv"><td colspan="5"> <a href="language/parameter_pack.html" title="cpp/language/parameter pack"> 参数包</a> <span class="t-mark-rev t-since-cxx11">(C++11)</span></td></tr>
</table></div></td></tr>
<tr class="t-nv-h1"><td colspan="5"> 杂项</td></tr>
<tr class="t-nv-col-table"><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <a href="language/asm.html" title="cpp/language/asm"> 内联汇编</a></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <a href="language/history.html" title="cpp/language/history"> C++ 的历史</a></td></tr>
</table></div></td></tr>
</table></div>
</div><div></div></div></div></div><div class="t-navbar-sep"> </div><div class="t-navbar-head"><strong class="selflink">C++ 关键词</strong><div class="t-navbar-menu"><div><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv-col-table"><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/alignas.html" title="cpp/keyword/alignas"><span class="t-lines"><span>alignas</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div></div></td></tr> 
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/alignof.html" title="cpp/keyword/alignof"><span class="t-lines"><span>alignof</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/and.html" title="cpp/keyword/and"><span class="t-lines"><span>and</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/and_eq.html" title="cpp/keyword/and eq"><span class="t-lines"><span>and_eq</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/asm.html" title="cpp/keyword/asm"><span class="t-lines"><span>asm</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/auto.html" title="cpp/keyword/auto"><span class="t-lines"><span>auto</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/bitand.html" title="cpp/keyword/bitand"><span class="t-lines"><span>bitand</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/bitor.html" title="cpp/keyword/bitor"><span class="t-lines"><span>bitor</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/bool.html" title="cpp/keyword/bool"><span class="t-lines"><span>bool</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/break.html" title="cpp/keyword/break"><span class="t-lines"><span>break</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/case.html" title="cpp/keyword/case"><span class="t-lines"><span>case</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/catch.html" title="cpp/keyword/catch"><span class="t-lines"><span>catch</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/char.html" title="cpp/keyword/char"><span class="t-lines"><span>char</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/char8_t.html" title="cpp/keyword/char8 t"><span class="t-lines"><span>char8_t</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/char16_t.html" title="cpp/keyword/char16 t"><span class="t-lines"><span>char16_t</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/char32_t.html" title="cpp/keyword/char32 t"><span class="t-lines"><span>char32_t</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/class.html" title="cpp/keyword/class"><span class="t-lines"><span>class</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/compl.html" title="cpp/keyword/compl"><span class="t-lines"><span>compl</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/concept.html" title="cpp/keyword/concept"><span class="t-lines"><span>concept</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/const.html" title="cpp/keyword/const"><span class="t-lines"><span>const</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/consteval.html" title="cpp/keyword/consteval"><span class="t-lines"><span>consteval</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/constexpr.html" title="cpp/keyword/constexpr"><span class="t-lines"><span>constexpr</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/constinit.html" title="cpp/keyword/constinit"><span class="t-lines"><span>constinit</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/const_cast.html" title="cpp/keyword/const cast"><span class="t-lines"><span>const_cast</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/continue.html" title="cpp/keyword/continue"><span class="t-lines"><span>continue</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/co_await.html" title="cpp/keyword/co await"><span class="t-lines"><span>co_await</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/co_return.html" title="cpp/keyword/co return"><span class="t-lines"><span>co_return</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/co_yield.html" title="cpp/keyword/co yield"><span class="t-lines"><span>co_yield</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/decltype.html" title="cpp/keyword/decltype"><span class="t-lines"><span>decltype</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/default.html" title="cpp/keyword/default"><span class="t-lines"><span>default</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/delete.html" title="cpp/keyword/delete"><span class="t-lines"><span>delete</span></span></a></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/do.html" title="cpp/keyword/do"><span class="t-lines"><span>do</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/double.html" title="cpp/keyword/double"><span class="t-lines"><span>double</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/dynamic_cast.html" title="cpp/keyword/dynamic cast"><span class="t-lines"><span>dynamic_cast</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/else.html" title="cpp/keyword/else"><span class="t-lines"><span>else</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/enum.html" title="cpp/keyword/enum"><span class="t-lines"><span>enum</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/explicit.html" title="cpp/keyword/explicit"><span class="t-lines"><span>explicit</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/export.html" title="cpp/keyword/export"><span class="t-lines"><span>export</span></span></a></div></div></td></tr> 
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/extern.html" title="cpp/keyword/extern"><span class="t-lines"><span>extern</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/false.html" title="cpp/keyword/false"><span class="t-lines"><span>false</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/float.html" title="cpp/keyword/float"><span class="t-lines"><span>float</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/for.html" title="cpp/keyword/for"><span class="t-lines"><span>for</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/friend.html" title="cpp/keyword/friend"><span class="t-lines"><span>friend</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/goto.html" title="cpp/keyword/goto"><span class="t-lines"><span>goto</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keywords/if.html" title="cpp/keyword/if"><span class="t-lines"><span>if</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/inline.html" title="cpp/keyword/inline"><span class="t-lines"><span>inline</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/int.html" title="cpp/keyword/int"><span class="t-lines"><span>int</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/long.html" title="cpp/keyword/long"><span class="t-lines"><span>long</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/mutable.html" title="cpp/keyword/mutable"><span class="t-lines"><span>mutable</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/namespace.html" title="cpp/keyword/namespace"><span class="t-lines"><span>namespace</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/new.html" title="cpp/keyword/new"><span class="t-lines"><span>new</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/noexcept.html" title="cpp/keyword/noexcept"><span class="t-lines"><span>noexcept</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/not.html" title="cpp/keyword/not"><span class="t-lines"><span>not</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/not_eq.html" title="cpp/keyword/not eq"><span class="t-lines"><span>not_eq</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/nullptr.html" title="cpp/keyword/nullptr"><span class="t-lines"><span>nullptr</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/operator.html" title="cpp/keyword/operator"><span class="t-lines"><span>operator</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/or.html" title="cpp/keyword/or"><span class="t-lines"><span>or</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/or_eq.html" title="cpp/keyword/or eq"><span class="t-lines"><span>or_eq</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/private.html" title="cpp/keyword/private"><span class="t-lines"><span>private</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/protected.html" title="cpp/keyword/protected"><span class="t-lines"><span>protected</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/public.html" title="cpp/keyword/public"><span class="t-lines"><span>public</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/register.html" title="cpp/keyword/register"><span class="t-lines"><span>register</span></span></a></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/reinterpret_cast.html" title="cpp/keyword/reinterpret cast"><span class="t-lines"><span>reinterpret_cast</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/requires.html" title="cpp/keyword/requires"><span class="t-lines"><span>requires</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/return.html" title="cpp/keyword/return"><span class="t-lines"><span>return</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/short.html" title="cpp/keyword/short"><span class="t-lines"><span>short</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/signed.html" title="cpp/keyword/signed"><span class="t-lines"><span>signed</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/sizeof.html" title="cpp/keyword/sizeof"><span class="t-lines"><span>sizeof</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keywords/static.html" title="cpp/keyword/static"><span class="t-lines"><span>static</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/static_assert.html" title="cpp/keyword/static assert"><span class="t-lines"><span>static_assert</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/static_cast.html" title="cpp/keyword/static cast"><span class="t-lines"><span>static_cast</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/struct.html" title="cpp/keyword/struct"><span class="t-lines"><span>struct</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/switch.html" title="cpp/keyword/switch"><span class="t-lines"><span>switch</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/template.html" title="cpp/keyword/template"><span class="t-lines"><span>template</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/this.html" title="cpp/keyword/this"><span class="t-lines"><span>this</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/thread_local.html" title="cpp/keyword/thread local"><span class="t-lines"><span>thread_local</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/throw.html" title="cpp/keyword/throw"><span class="t-lines"><span>throw</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/true.html" title="cpp/keyword/true"><span class="t-lines"><span>true</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/try.html" title="cpp/keyword/try"><span class="t-lines"><span>try</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/typedef.html" title="cpp/keyword/typedef"><span class="t-lines"><span>typedef</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/typeid.html" title="cpp/keyword/typeid"><span class="t-lines"><span>typeid</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/typename.html" title="cpp/keyword/typename"><span class="t-lines"><span>typename</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/union.html" title="cpp/keyword/union"><span class="t-lines"><span>union</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/unsigned.html" title="cpp/keyword/unsigned"><span class="t-lines"><span>unsigned</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/using.html" title="cpp/keyword/using"><span class="t-lines"><span>using</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/virtual.html" title="cpp/keyword/virtual"><span class="t-lines"><span>virtual</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/void.html" title="cpp/keyword/void"><span class="t-lines"><span>void</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/volatile.html" title="cpp/keyword/volatile"><span class="t-lines"><span>volatile</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/wchar_t.html" title="cpp/keyword/wchar t"><span class="t-lines"><span>wchar_t</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/while.html" title="cpp/keyword/while"><span class="t-lines"><span>while</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/xor.html" title="cpp/keyword/xor"><span class="t-lines"><span>xor</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/xor_eq.html" title="cpp/keyword/xor eq"><span class="t-lines"><span>xor_eq</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"> <br>
</td></tr>
</table></div></td></tr>
<tr class="t-nv-h2"><td colspan="5"> 具有特殊含义的标识符 </td></tr>
<tr class="t-nv-col-table"><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/final.html" title="cpp/keyword/final"><span class="t-lines"><span>final</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="keyword/override.html" title="cpp/keyword/override"><span class="t-lines"><span>override</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/keyword/import&amp;action=edit&amp;redlink=1" class="new" title="cpp/keyword/import（页面不存在）"><span class="t-lines"><span>import</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/keyword/module&amp;action=edit&amp;redlink=1" class="new" title="cpp/keyword/module（页面不存在）"><span class="t-lines"><span>module</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span></span></div></div></td></tr>
</table></div></td></tr>
</table></div><div></div></div></div></div><div class="t-navbar-sep"> </div></div>
<p>这是 C++ 中的保留字列表。因为它们为语言所用，故这些关键词不可用于重定义或重载。
</p>
<table class="wikitable">

<tr>
<td>
<p><a href="keyword/alignas.html" title="cpp/keyword/alignas"><code>alignas</code></a> <span class="t-mark-rev t-since-cxx11">(C++11 起)</span><br>
<a href="keyword/alignof.html" title="cpp/keyword/alignof"><code>alignof</code></a> <span class="t-mark-rev t-since-cxx11">(C++11 起)</span><br>
<a href="keyword/and.html" title="cpp/keyword/and"><code>and</code></a><br>
<a href="keyword/and_eq.html" title="cpp/keyword/and eq"><code>and_eq</code></a><br>
<a href="keyword/asm.html" title="cpp/keyword/asm"><code>asm</code></a><br>
<a href="language/transactional_memory.html" title="cpp/language/transactional memory"><tt>atomic_cancel</tt></a> <span class="t-mark-rev t-since-tm-ts t-mark-ts">(TM TS)</span><br>
<a href="language/transactional_memory.html" title="cpp/language/transactional memory"><tt>atomic_commit</tt></a> <span class="t-mark-rev t-since-tm-ts t-mark-ts">(TM TS)</span><br>
<a href="language/transactional_memory.html" title="cpp/language/transactional memory"><tt>atomic_noexcept</tt></a> <span class="t-mark-rev t-since-tm-ts t-mark-ts">(TM TS)</span><br>
<a href="keyword/auto.html" title="cpp/keyword/auto"><code>auto</code></a><span class="t-mark">(1)</span><br>
<a href="keyword/bitand.html" title="cpp/keyword/bitand"><code>bitand</code></a><br>
<a href="keyword/bitor.html" title="cpp/keyword/bitor"><code>bitor</code></a><br>
<a href="keyword/bool.html" title="cpp/keyword/bool"><code>bool</code></a><br>
<a href="keyword/break.html" title="cpp/keyword/break"><code>break</code></a><br>
<a href="keyword/case.html" title="cpp/keyword/case"><code>case</code></a><br>
<a href="keyword/catch.html" title="cpp/keyword/catch"><code>catch</code></a><br>
<a href="keyword/char.html" title="cpp/keyword/char"><code>char</code></a><br>
<a href="keyword/char8_t.html" title="cpp/keyword/char8 t"><code>char8_t</code></a> <span class="t-mark-rev t-since-cxx20">(C++20 起)</span><br>
<a href="keyword/char16_t.html" title="cpp/keyword/char16 t"><code>char16_t</code></a> <span class="t-mark-rev t-since-cxx11">(C++11 起)</span><br>
<a href="keyword/char32_t.html" title="cpp/keyword/char32 t"><code>char32_t</code></a> <span class="t-mark-rev t-since-cxx11">(C++11 起)</span><br>
<a href="keyword/class.html" title="cpp/keyword/class"><code>class</code></a><span class="t-mark">(1)</span><br>
<a href="keyword/compl.html" title="cpp/keyword/compl"><code>compl</code></a><br>
<a href="keyword/concept.html" title="cpp/keyword/concept"><code>concept</code></a> <span class="t-mark-rev t-since-cxx20">(C++20 起)</span><br>
<a href="keyword/const.html" title="cpp/keyword/const"><code>const</code></a><br>
<a href="keyword/consteval.html" title="cpp/keyword/consteval"><code>consteval</code></a> <span class="t-mark-rev t-since-cxx20">(C++20 起)</span><br>
<a href="keyword/constexpr.html" title="cpp/keyword/constexpr"><code>constexpr</code></a> <span class="t-mark-rev t-since-cxx11">(C++11 起)</span><br>
<a href="keyword/constinit.html" title="cpp/keyword/constinit"><code>constinit</code></a> <span class="t-mark-rev t-since-cxx20">(C++20 起)</span><br>
<a href="keyword/const_cast.html" title="cpp/keyword/const cast"><code>const_cast</code></a><br>
<a href="keyword/continue.html" title="cpp/keyword/continue"><code>continue</code></a><br>
<a href="keyword/co_await.html" title="cpp/keyword/co await"><code>co_await</code></a> <span class="t-mark-rev t-since-cxx20">(C++20 起)</span><br>
<a href="keyword/co_return.html" title="cpp/keyword/co return"><code>co_return</code></a> <span class="t-mark-rev t-since-cxx20">(C++20 起)</span><br>
<a href="keyword/co_yield.html" title="cpp/keyword/co yield"><code>co_yield</code></a> <span class="t-mark-rev t-since-cxx20">(C++20 起)</span><br>
<a href="keyword/decltype.html" title="cpp/keyword/decltype"><code>decltype</code></a> <span class="t-mark-rev t-since-cxx11">(C++11 起)</span><br>
</p>
</td>
<td>
<p><a href="keyword/default.html" title="cpp/keyword/default"><code>default</code></a><span class="t-mark">(1)</span><br>
<a href="keyword/delete.html" title="cpp/keyword/delete"><code>delete</code></a><span class="t-mark">(1)</span><br>
<a href="keyword/do.html" title="cpp/keyword/do"><code>do</code></a><br>
<a href="keyword/double.html" title="cpp/keyword/double"><code>double</code></a><br>
<a href="keyword/dynamic_cast.html" title="cpp/keyword/dynamic cast"><code>dynamic_cast</code></a><br>
<a href="keyword/else.html" title="cpp/keyword/else"><code>else</code></a><br>
<a href="keyword/enum.html" title="cpp/keyword/enum"><code>enum</code></a><br>
<a href="keyword/explicit.html" title="cpp/keyword/explicit"><code>explicit</code></a><br>
<a href="keyword/export.html" title="cpp/keyword/export"><code>export</code></a><span class="t-mark">(1)</span><span class="t-mark">(3)</span><br> 
<a href="keyword/extern.html" title="cpp/keyword/extern"><code>extern</code></a><span class="t-mark">(1)</span><br>
<a href="keyword/false.html" title="cpp/keyword/false"><code>false</code></a><br>
<a href="keyword/float.html" title="cpp/keyword/float"><code>float</code></a><br>
<a href="keyword/for.html" title="cpp/keyword/for"><code>for</code></a><br>
<a href="keyword/friend.html" title="cpp/keyword/friend"><code>friend</code></a><br>
<a href="keyword/goto.html" title="cpp/keyword/goto"><code>goto</code></a><br>
<a href="keywords/if.html" title="cpp/keyword/if"><code>if</code></a><br>
<a href="keyword/inline.html" title="cpp/keyword/inline"><code>inline</code></a><span class="t-mark">(1)</span><br>
<a href="keyword/int.html" title="cpp/keyword/int"><code>int</code></a><br>
<a href="keyword/long.html" title="cpp/keyword/long"><code>long</code></a><br>
<a href="keyword/mutable.html" title="cpp/keyword/mutable"><code>mutable</code></a><span class="t-mark">(1)</span><br>
<a href="keyword/namespace.html" title="cpp/keyword/namespace"><code>namespace</code></a><br>
<a href="keyword/new.html" title="cpp/keyword/new"><code>new</code></a><br>
<a href="keyword/noexcept.html" title="cpp/keyword/noexcept"><code>noexcept</code></a> <span class="t-mark-rev t-since-cxx11">(C++11 起)</span><br>
<a href="keyword/not.html" title="cpp/keyword/not"><code>not</code></a><br>
<a href="keyword/not_eq.html" title="cpp/keyword/not eq"><code>not_eq</code></a><br>
<a href="keyword/nullptr.html" title="cpp/keyword/nullptr"><code>nullptr</code></a> <span class="t-mark-rev t-since-cxx11">(C++11 起)</span><br>
<a href="keyword/operator.html" title="cpp/keyword/operator"><code>operator</code></a><br>
<a href="keyword/or.html" title="cpp/keyword/or"><code>or</code></a><br>
<a href="keyword/or_eq.html" title="cpp/keyword/or eq"><code>or_eq</code></a><br>
<a href="keyword/private.html" title="cpp/keyword/private"><code>private</code></a><br>
<a href="keyword/protected.html" title="cpp/keyword/protected"><code>protected</code></a><br>
<a href="keyword/public.html" title="cpp/keyword/public"><code>public</code></a><br>
<a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/keyword/reflexpr&amp;action=edit&amp;redlink=1" class="new" title="cpp/keyword/reflexpr（页面不存在）"><code>reflexpr</code></a> <span class="t-mark-rev t-since-reflection-ts t-mark-ts">(反射 TS)</span><br>
</p>
</td>
<td>
<p><a href="keyword/register.html" title="cpp/keyword/register"><code>register</code></a><span class="t-mark">(2)</span><br>
<a href="keyword/reinterpret_cast.html" title="cpp/keyword/reinterpret cast"><code>reinterpret_cast</code></a><br>
<a href="keyword/requires.html" title="cpp/keyword/requires"><code>requires</code></a> <span class="t-mark-rev t-since-cxx20">(C++20 起)</span><br>
<a href="keyword/return.html" title="cpp/keyword/return"><code>return</code></a><br>
<a href="keyword/short.html" title="cpp/keyword/short"><code>short</code></a><br>
<a href="keyword/signed.html" title="cpp/keyword/signed"><code>signed</code></a><br>
<a href="keyword/sizeof.html" title="cpp/keyword/sizeof"><code>sizeof</code></a><span class="t-mark">(1)</span><br>
<a href="keywords/static.html" title="cpp/keyword/static"><code>static</code></a><br>
<a href="keyword/static_assert.html" title="cpp/keyword/static assert"><code>static_assert</code></a> <span class="t-mark-rev t-since-cxx11">(C++11 起)</span><br>
<a href="keyword/static_cast.html" title="cpp/keyword/static cast"><code>static_cast</code></a><br>
<a href="keyword/struct.html" title="cpp/keyword/struct"><code>struct</code></a><span class="t-mark">(1)</span><br>
<a href="keyword/switch.html" title="cpp/keyword/switch"><code>switch</code></a><br>
<a href="language/transactional_memory.html" title="cpp/language/transactional memory"><tt>synchronized</tt></a> <span class="t-mark-rev t-since-tm-ts t-mark-ts">(TM TS)</span><br>
<a href="keyword/template.html" title="cpp/keyword/template"><code>template</code></a><br>
<a href="keyword/this.html" title="cpp/keyword/this"><code>this</code></a><br>
<a href="keyword/thread_local.html" title="cpp/keyword/thread local"><code>thread_local</code></a> <span class="t-mark-rev t-since-cxx11">(C++11 起)</span><br>
<a href="keyword/throw.html" title="cpp/keyword/throw"><code>throw</code></a><br>
<a href="keyword/true.html" title="cpp/keyword/true"><code>true</code></a><br>
<a href="keyword/try.html" title="cpp/keyword/try"><code>try</code></a><br>
<a href="keyword/typedef.html" title="cpp/keyword/typedef"><code>typedef</code></a><br>
<a href="keyword/typeid.html" title="cpp/keyword/typeid"><code>typeid</code></a><br>
<a href="keyword/typename.html" title="cpp/keyword/typename"><code>typename</code></a><br>
<a href="keyword/union.html" title="cpp/keyword/union"><code>union</code></a><br>
<a href="keyword/unsigned.html" title="cpp/keyword/unsigned"><code>unsigned</code></a><br>
<a href="keyword/using.html" title="cpp/keyword/using"><code>using</code></a><span class="t-mark">(1)</span><br>
<a href="keyword/virtual.html" title="cpp/keyword/virtual"><code>virtual</code></a><br>
<a href="keyword/void.html" title="cpp/keyword/void"><code>void</code></a><br>
<a href="keyword/volatile.html" title="cpp/keyword/volatile"><code>volatile</code></a><br>
<a href="keyword/wchar_t.html" title="cpp/keyword/wchar t"><code>wchar_t</code></a><br>
<a href="keyword/while.html" title="cpp/keyword/while"><code>while</code></a><br>
<a href="keyword/xor.html" title="cpp/keyword/xor"><code>xor</code></a><br>
<a href="keyword/xor_eq.html" title="cpp/keyword/xor eq"><code>xor_eq</code></a>
</p>
</td></tr></table>
<ul><li> (1) - C++11 中含义改变或添加新含义。
</li><li> (2) - C++17 中含义改变。
</li><li> (3) - C++20 中含义改变。
</li></ul>
<p>注意 <a href="keyword/and.html" title="cpp/keyword/and"><code>and</code></a>、<a href="keyword/bitor.html" title="cpp/keyword/bitor"><code>bitor</code></a>、<a href="keyword/or.html" title="cpp/keyword/or"><code>or</code></a>、<a href="keyword/xor.html" title="cpp/keyword/xor"><code>xor</code></a>、<a href="keyword/compl.html" title="cpp/keyword/compl"><code>compl</code></a>、<a href="keyword/bitand.html" title="cpp/keyword/bitand"><code>bitand</code></a>、<a href="keyword/and_eq.html" title="cpp/keyword/and eq"><code>and_eq</code></a>、<a href="keyword/or_eq.html" title="cpp/keyword/or eq"><code>or_eq</code></a>、<a href="keyword/xor_eq.html" title="cpp/keyword/xor eq"><code>xor_eq</code></a>、<a href="keyword/not.html" title="cpp/keyword/not"><code>not</code></a> 及 <a href="keyword/not_eq.html" title="cpp/keyword/not eq"><code>not_eq</code></a>（还有双标符 <code>&lt;%</code>、<code>%&gt;</code>、<code>&lt;:</code>、<code>:&gt;</code>、<code>%:</code> 及 <code>%:%:</code>）提供<a href="language/operator_alternative.html" title="cpp/language/operator alternative">标准记号的代用表示方法</a>。
</p><p>除了关键词外，还有<i>拥有特殊含义的标识符</i>，它们可用作对象或函数的名字，但在某些语境拥有特殊含义。
</p>
<table class="wikitable">

<tr>
<td>
<p><a href="language/override.html" title="cpp/language/override"><tt>override</tt></a> <span class="t-mark-rev t-since-cxx11">(C++11)</span><br>
<a href="language/final.html" title="cpp/language/final"><tt>final</tt></a> <span class="t-mark-rev t-since-cxx11">(C++11)</span><br>
<a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/keyword/import&amp;action=edit&amp;redlink=1" class="new" title="cpp/keyword/import（页面不存在）"><code>import</code></a> <span class="t-mark-rev t-since-cxx20">(C++20)</span><br>
<a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/keyword/module&amp;action=edit&amp;redlink=1" class="new" title="cpp/keyword/module（页面不存在）"><code>module</code></a> <span class="t-mark-rev t-since-cxx20">(C++20)</span><br>
<a href="language/transactional_memory.html" title="cpp/language/transactional memory"><tt>transaction_safe</tt></a> <span class="t-mark-rev t-since-tm-ts t-mark-ts">(TM TS)</span><br>
<a href="language/transactional_memory.html" title="cpp/language/transactional memory"><tt>transaction_safe_dynamic</tt></a> <span class="t-mark-rev t-since-tm-ts t-mark-ts">(TM TS)</span>
</p>
</td></tr></table>
<p>还有，在任何位置含双下划线 __ 的所有<a href="language/name.html" title="cpp/language/identifiers">标识符</a>，和以一个下划线后随一个大写字母开始的所有标识符，都始终受保留，而所有以单下划线开始的标识符，保留用作全局命名空间中的名称。更多细节见<a href="language/name.html" title="cpp/language/identifiers">标识符</a>。
</p><p>命名空间 <code>std</code> 用于放置标准 C++ 库中的名称。关于向它添加名称的规则，见<a href="language/extending_std.html" title="cpp/language/extending std">扩充命名空间 std</a> 。
</p>
 <table class="t-rev-begin">
<tr class="t-rev t-since-cxx11"><td>
<p>名称 <code>posix</code> 保留作为未来的顶级命名空间。若程序于该命名空间声明或定义任何内容，则行为未定义。
</p>
</td>
<td><span class="t-mark-rev t-since-cxx11">(C++11 起)</span></td></tr>
</table>
<p><a href="preprocessor.html" title="cpp/preprocessor">预处理器</a>在预处理指令的语境中识别下列记号：
</p>
<table class="wikitable">

<tr>
<td>
<p><a href="preprocessor/conditional.html" title="cpp/preprocessor/conditional"><tt>if</tt></a><br>
<a href="preprocessor/conditional.html" title="cpp/preprocessor/conditional"><tt>elif</tt></a><br>
<a href="preprocessor/conditional.html" title="cpp/preprocessor/conditional"><tt>else</tt></a><br>
<a href="preprocessor/conditional.html" title="cpp/preprocessor/conditional"><tt>endif</tt></a><br>
</p>
</td>
<td>
<p><a href="preprocessor/conditional.html" title="cpp/preprocessor/conditional"><tt>ifdef</tt></a><br>
<a href="preprocessor/conditional.html" title="cpp/preprocessor/conditional"><tt>ifndef</tt></a><br>
<a href="preprocessor/replace.html" title="cpp/preprocessor/replace"><tt>define</tt></a><br>
<a href="preprocessor/replace.html" title="cpp/preprocessor/replace"><tt>undef</tt></a><br>
</p>
</td>
<td>
<p><a href="preprocessor/include.html" title="cpp/preprocessor/include"><tt>include</tt></a><br>
<a href="preprocessor/line.html" title="cpp/preprocessor/line"><tt>line</tt></a><br>
<a href="preprocessor/error.html" title="cpp/preprocessor/error"><tt>error</tt></a><br>
<a href="preprocessor/impl.html" title="cpp/preprocessor/impl"><tt>pragma</tt></a><br>
</p>
</td>
<td>
<p><a href="preprocessor/conditional.html" title="cpp/preprocessor/conditional"><tt>defined</tt></a><br>
<a href="feature_test.html" title="cpp/feature test"><tt>__has_include</tt></a> <span class="t-mark-rev t-since-cxx17">(C++17 起)</span><br>
<a href="feature_test.html" title="cpp/feature test"><tt>__has_cpp_attribute</tt></a> <span class="t-mark-rev t-since-cxx20">(C++20 起)</span>
</p>
</td></tr></table>
<p>预处理器在预处理指令的语境<i>之外</i>识别下列记号：
</p>
<table class="wikitable">

<tr>
<td>
<p><a href="preprocessor/impl.html" title="cpp/preprocessor/impl"><tt>_Pragma</tt></a><span class="t-mark-rev t-since-cxx11">(C++11 起)</span>
</p>
</td></tr></table>
<h3><span class="mw-headline" id=".E5.8F.82.E9.98.85">参阅</span></h3>
<table class="t-dsc-begin">

</table>

<!-- 
NewPP limit report
Preprocessor visited node count: 10675/1000000
Preprocessor generated node count: 11206/1000000
Post‐expand include size: 257391/2097152 bytes
Template argument size: 36630/2097152 bytes
Highest expansion depth: 15/40
Expensive parser function count: 0/100
-->

<!-- Saved in parser cache with key mwiki1-mwiki_zh_:pcache:idhash:811-0!*!0!*!*!*!zh!* and timestamp 20190901083912 -->
</div>                    <!-- /bodycontent -->
                                        <!-- printfooter -->
                    <div class="printfooter">
                    来自“<a href="https://zh.cppreference.com/mwiki/index.php?title=cpp/keyword&amp;oldid=62522">https://zh.cppreference.com/mwiki/index.php?title=cpp/keyword&amp;oldid=62522</a>”                    </div>
                    <!-- /printfooter -->
                                                            <!-- catlinks -->
                    <!-- /catlinks -->
                                                            <div class="visualClear"></div>
                    <!-- debughtml -->
                                        <!-- /debughtml -->
                </div>
                <!-- /bodyContent -->
            </div>
        </div>
        <!-- /content -->
        <!-- footer -->
        <div id="cpp-footer-base" class="noprint">
            <div id="footer">
                        <div id="cpp-navigation">
            <h5>导航</h5>
            <ul><li><a href="https://zh.cppreference.com/w/cpp/keywords">Online version</a></li><li>Offline version retrieved 2020-03-14 18:00.</li></ul></div>
                        <ul id="footer-info">
                                    <li id="footer-info-lastmod"> 本页面最后修改于2019年8月31日 (星期六) 21:11。</li>
                                    <li id="footer-info-viewcount">此页面已被浏览过67,300次。</li>
                            </ul>
                    </div>
        </div>
        <!-- /footer -->
        <script>if(window.mw){
mw.loader.state({"site":"loading","user":"missing","user.groups":"ready"});
}</script>
<script src="../../common/skin_scripts.js"></script>
<script>if(window.mw){
mw.loader.load(["mediawiki.action.view.postEdit","mediawiki.user","mediawiki.page.ready","mediawiki.searchSuggest","mediawiki.hidpi","ext.gadget.MathJax","ext.gadget.ColiruCompiler"], null, true);
}</script>
<script src="../../common/site_scripts.js"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-2828341-1']);
_gaq.push(['_setDomainName', 'cppreference.com']);
_gaq.push(['_trackPageview']);
</script><!-- Served in 0.062 secs. -->
	</body>
<!-- Cached 20190901091156 -->
</html>